package com.qianheng.test.spring;


import com.qianheng.kit.common.dto.user.UserDTO;
import com.qianheng.test.spring.controller.TestController;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.support.ClassPathXmlApplicationContext;

@Slf4j
public class Application {
    public static void main(String[] args) {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("test-spring-configration.xml");
        UserDTO userDTO = context.getBean("userDTO", UserDTO.class);
        log.info("spring启动,打印user Bean: {} ", userDTO.toString());

        TestController testController = context.getBean(TestController.class);
        testController.test();
    }
}
